home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / CombineFiles.cpt / CompileFile.pas < prev    next >
Pascal/Delphi Source File  |  1990-07-15  |  2KB  |  63 lines

  1. Program CombineFiles;
  2.  
  3. {$R-}               { Turn off range checking               }
  4. {$S+}               { Turn on Segmentation                  }
  5. {$I-}               { Turn off I/O error checking           }
  6. {$B+}               { Set bundle bit (for icon, etc.)       }
  7. {$R Katharine:CompileFile.Rsrc}
  8. {$T APPLMSK^}       { Set application ID                    }
  9. {$U-}
  10.  
  11.   uses Memtypes,QuickDraw,OSIntf,ToolIntf,Pasinout,PasConsole,PackIntf;
  12.     
  13. Function Meow(theRes: Integer; theIndex: Integer) : String;
  14.  
  15.     var TempStr : Str255;
  16.     
  17.     Begin
  18.         GetIndString(TempStr,theRes,theIndex);
  19.         Meow := TempStr;
  20.         end;
  21.  
  22. Procedure Launchit (mode : integer;
  23.                     fName : STR255);
  24.  
  25. INLINE
  26.    $204F, $A9F2;
  27.    
  28. Procedure CombineFiles;
  29.  
  30.     Type    MsgType = Array[1..920] of signedbyte;
  31.     
  32.     Var     TheFile     :   MsgType;
  33.             InFile      :   File of MsgType;
  34.             OutFile     :   File of MsgType;
  35.             FileSect    :   Byte;
  36.             FileCount   :   Longint;
  37.  
  38.     Begin
  39.         FileType := 'FSEC'; FileCreator := 'MSK^';
  40.         ReWrite(OutFile,Meow(130,2));
  41.         For FileSect := 1 to 100 do begin
  42.             If Length(Meow(129,FileSect)) >0 then begin
  43.                 Writeln('Working on ',Meow(129,FileSect),'.');
  44.                 Reset(InFile,Meow(129,FileSect));
  45.                 Repeat
  46.                     If not Eof(InFile) then begin
  47.                         Read(InFile,TheFile);
  48.                         Write(OutFile,TheFile);
  49.                         FileCount := FileCount +1;
  50.                         end;
  51.                     Until eof(InFile);
  52.                 Close(InFile);
  53.                 end;
  54.             end;
  55.         Close(OutFile);
  56.         end;
  57.     
  58. Begin
  59.     Writeln('Combine File Section  v1.0 by Mark Kupferman');
  60.     Writeln;
  61.     CombineFiles;
  62.     Launchit(0,Meow(130,1));
  63.     end.